﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AO.Core;

namespace ZoneEngine.Packets
{
    class SystemText
    {
        public static void Send(Client cli, string text, int color)
        {
            PacketWriter pw = new PacketWriter();
            pw.PushByte(0xdf);
            pw.PushByte(0xdf);
            pw.PushShort(0xa);
            pw.PushShort(1);
            pw.PushShort(0);
            pw.PushInt(3086);
            pw.PushInt(cli.Character.ID);
            pw.PushInt(0x206b4b73);
            pw.PushInt(50000);
            pw.PushInt(cli.Character.ID);
            pw.PushByte(1);
            pw.PushInt(0);
            pw.PushInt(0x557e26);
            pw.PushInt(0x21212122);
            pw.PushInt(0x3a212121);
            pw.PushShort(0x293c);
            pw.PushByte(0x73);
            pw.PushByte((byte)text.Length);
            pw.PushString(text);
            pw.PushInt(0);

            byte[] packet = pw.Finish();

            cli.SendCompressed(packet);
        }
    }
}
